//
//  UILabel+CustomLabel.swift
//  微博
//
//  Created by 余仿 on 16/4/12.
//  Copyright © 2016年 YF. All rights reserved.
//

import UIKit


extension UILabel{

    convenience init(title:String,fontSize:CGFloat,fontColor:UIColor,margin:CGFloat = 0){

        self.init()

        text = title

        font = UIFont.systemFontOfSize(fontSize)

        textColor = fontColor

        if margin > 0{

            preferredMaxLayoutWidth = screenWidth - 2 * statusCellMargin

            textAlignment = .Left
        }
        
        numberOfLines = 0
        
        sizeToFit()
    }
    
}